package com.system.demo.controller;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.system.demo.model.ConsumeLog;
import com.system.demo.service.IConsumeLogService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("/consume")
@Api(tags = "模拟刷卡")
public class ConsumeLogController {

	@Resource
	private IConsumeLogService consumeLogService;
	
	@ApiOperation(value = "刷卡",notes = "刷卡")
	@PostMapping()
	public String swipe(ConsumeLog c) {
		consumeLogService.save(c);
		return "success";
	}
}
